#ifndef __KGWScale_H_Included__
#define __KGWScale_H_Included__

// This is a data class for the graph widget's scale.
// Copyright (C) 2007 Michael T. Dean, miketdean@gmail.com
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.


class QString;
class QColor;

class KGWScale
{
	public:

		KGWScale( KGWController * controller );
		virtual ~KGWScale();

		void setXScale( float min, float max, int numSteps, bool auto=false );
		void setYScale( float min, float max, int numSteps, bool auto=false );
		void setZScale( float min, float max, int numSteps, bool auto=false );

		void setXParams( QString & name, QColor & lineColor, QString & unit, QString & key );
		void setYParams( QString & name, QColor & lineColor, QString & unit, QString & key );
		void setZParams( QString & name, QColor & lineColor, QString & unit, QString & key );

		void setScaleTheme( KGWScaleTheme & theme );
		KGWScaleTheme getScaleTheme();

	private:

		class _axisScale
		{
			public:

				_axisScale( float min, float max, int numSteps, bool autoSize=false ) :
					_min( min ), _max( max ), _numSteps( numSteps ), _auto( autoSize )
				{}
				~_axisScale() {}

				float min()     { return min;      }
				float max()     { return max;      }
				int numSteps()  { return numSteps; }
				bool autoSize() { return _auto;    }
			
			private:

				float _min;
				float _max;
				int   _numSteps;
				bool  _auto;
		};

		class _axisParams
		{
			public:

				_axisParams( QString name, QString unit, QString key, QColor color ) :
					_name( name ), _unit( unit ), _key( key ), _color( color )
				{}
				~_axisParams() {}

				QString name()  { return _name;  }
				QString unit()  { return _unit;  }
				QString key()   { return _key;   }
				QColor  color() { return _color; }

			private:

				QString _name;
				QString _unit;
				QString _key;
				QColor  _color;
		};

		_axisScale	_xScale;
		_axisScale	_yScale;
		_axisScale	_zScale;

		_axisParams	_xParams;
		_axisParams	_yParams;
		_axisParams	_zParams;

		KGWScaleTheme	_theme;
};



#endif // __KGWScale_H_Included__
